<?php
class CdeUnit extends AppModel {

	var $name = 'CdeUnit';
	var $validate = array(
		'title' => array(
			'rule' => 'notempty',
			'message' => 'Unit title is required'),
		'description' => array(
			'rule' => 'notempty',
			'message' => 'Unit description is required'),
		'introduction' => array(
			'rule' => 'notempty',
			'message' => 'Unit introduction is required'),
		'imageurl' => array(
			'rule' => 'url',
			'message' => 'Please provide a valid URL'),
		'enabled' => array('numeric')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $hasMany = array(
		'CdeModule' => array(
			'className' => 'CdeModule',
			'foreignKey' => 'cde_unit_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
?>